package com.fyl.pattern.decorator;

public class Client {
    public static void main(String[] args) {
        //一份炒饭
        FastFood food = new FriedRice();
        System.out.println(food.getDesc()+" "+food.cost()+"元");
        System.out.println("========");
        //加一个鸡蛋
        food  = new Egg(food);
        System.out.println(food.getDesc()+" "+food.cost()+"元");

        //再加一个鸡蛋
        food  = new Egg(food);
        System.out.println(food.getDesc()+" "+food.cost()+"元");

        //再加一个培根
        Bacon bacon = new Bacon(food);
        System.out.println(bacon.getDesc()+" "+bacon.cost()+"元");
    }
}
